package com.ruoyi.material.service.impl;

import java.util.List;

import com.ruoyi.material.domain.PurchaseOrderProduct;
import com.ruoyi.material.mapper.PurchaseOrderProductMapper;
import com.ruoyi.material.service.IPurchaseOrderProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 采购单食品关联Service业务层处理
 *
 * @author wng
 * @date 2024-08-04
 */
@Service
public class PurchaseOrderProductServiceImpl implements IPurchaseOrderProductService {
    @Resource
    private PurchaseOrderProductMapper purchaseOrderProductMapper;

    /**
     * 查询采购单食品关联
     *
     * @param id 采购单食品关联主键
     * @return 采购单食品关联
     */
    @Override
    public PurchaseOrderProduct selectPurchaseOrderProductById(Long id) {
        return purchaseOrderProductMapper.selectPurchaseOrderProductById(id);
    }

    /**
     * 查询采购单食品关联列表
     *
     * @param purchaseOrderProduct 采购单食品关联
     * @return 采购单食品关联
     */
    @Override
    public List<PurchaseOrderProduct> selectPurchaseOrderProductList(PurchaseOrderProduct purchaseOrderProduct) {
        return purchaseOrderProductMapper.selectPurchaseOrderProductList(purchaseOrderProduct);
    }

    /**
     * 新增采购单食品关联
     *
     * @param purchaseOrderProduct 采购单食品关联
     * @return 结果
     */
    @Override
    public int insertPurchaseOrderProduct(PurchaseOrderProduct purchaseOrderProduct) {
        return purchaseOrderProductMapper.insertPurchaseOrderProduct(purchaseOrderProduct);
    }

    /**
     * 修改采购单食品关联
     *
     * @param purchaseOrderProduct 采购单食品关联
     * @return 结果
     */
    @Override
    public int updatePurchaseOrderProduct(PurchaseOrderProduct purchaseOrderProduct) {
        return purchaseOrderProductMapper.updatePurchaseOrderProduct(purchaseOrderProduct);
    }

    /**
     * 批量删除采购单食品关联
     *
     * @param ids 需要删除的采购单食品关联主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderProductByIds(Long[] ids) {
        return purchaseOrderProductMapper.deletePurchaseOrderProductByIds(ids);
    }

    /**
     * 删除采购单食品关联信息
     *
     * @param id 采购单食品关联主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderProductById(Long id) {
        return purchaseOrderProductMapper.deletePurchaseOrderProductById(id);
    }
}
